#!/bin/sh

# check args see if user gives us the necessary stuff
if [ $# -lt 2 ]; then
    echo "\
usage: monitor <dir> <depth> [options...]
  - options:
    - additional args to feed the tree utility

 like: monitor . 2
       monitor ~ 1 -t -C"
    exit 1
fi

cd "$1" || exit
while (true);
    do clear && tree -d -L $2 -n $3 && sleep 5;
done
